<?php
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

require_once realpath(dirname(__FILE__).'/../library/include.php');

$app=Jii::createConsoleApplication('config/console.php');
$app->commandRunner->addCommands(YII_PATH.'/cli/commands');

$env=@getenv('YII_CONSOLE_COMMANDS');
if(!empty($env))
	$app->commandRunner->addCommands($env);

$app->run();